home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / asmbler.arc / DDIIL2.ASM < prev    next >
Assembly Source File  |  1988-11-19  |  2KB  |  60 lines

  1.  
  2. PUBLIC  DDIIL
  3.  
  4. ASSUME  CS:$DDIIL
  5.  
  6. INCLUDE DOS.INC
  7.  
  8. $DDIIL  SEGMENT PARA PUBLIC 'CODE'
  9.  
  10. COMMENT \
  11.  
  12. PROCEDURE DDIIL (IX0,IY0,IX1,IY1 : integer; VISBLE : boolean);
  13. {
  14. (Incremental Line)
  15. Fill in the  steps on  the plot frame  between the  point (IX0,IY0)  and
  16. (IX1,IY1), where IX0, IY0, IX1, and  IY1 are in actual raster units  for
  17. the device being  used.  If a  vector plot  device is to  be used,  this
  18. routine might instead simply transmit a single vector to a buffer.
  19.  
  20. This version uses a symmetric DDA  algorithm due to Van Throng (?).
  21. (25-JAN-84)
  22. }
  23. VAR
  24.         AXIS, AXISX, AXISY, BIAS, DELX, DELY, DIAG, DIAGX, DIAGY, I, IX,
  25.         IY, NDIST, NUMPNT, SX, SY : INTEGER;
  26.  
  27. \
  28.  
  29. ARGCNT  EQU     5               ; Number of arguments
  30. IX0     EQU     [BP]            ; Define symbolic argument frame offsets
  31. IY0     EQU     [BP-2]
  32. IX1     EQU     [BP-4]
  33. IY1     EQU     [BP-6]
  34. VISBLE  EQU     [BP-8]
  35.                                 ; return address as CS:offset at [BP-10..13]
  36.                                 ; old BP at [BP-14..15]
  37.  
  38. DDIIL   PROC    FAR
  39.         PUSH    BP              ; Save caller's frame pointer
  40.         MOV     BP,SP           ; and set up our own.
  41.         ADD     BP,4+2*ARGCNT   ; Point to top of arg list on stack
  42.         MOV     DX,VISBLE
  43.         TEST    DL,DL           ; VISBLE = false?
  44.         JZ      DONE            ; yes, nothing to draw
  45.         MOV     CX,IX0
  46.         MOV     DX,IY0
  47.         MOV     AH,$QS_VECTORMOVE
  48.         INT     $VIDEO
  49.         MOV     CX,IX1
  50.         MOV     DX,IY1
  51.         MOV     AH,81H          ; Default color
  52.         MOV     AH,$QS_VECTORDRAW
  53.         INT     $VIDEO
  54. DONE:                           ; here when done
  55.         POP     BP              ; restore caller's frame pointer
  56.         RET     2*ARGCNT        ; and return discarding stack arguments
  57. DDIIL   ENDP
  58. $DDIIL  ENDS
  59.         END
  60.